﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HNG.LIB.Common;
using HNG.Portal.BLL;
using HNG.Portal.DAL;
using HNG.Portal.DAL.EntityClasses;
using HNG.Portal.DAL.FactoryClasses;
using HNG.Portal.DAL.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using System.Web.UI.HtmlControls;
using System.Data;
public partial class Include_inc_Webinfo : System.Web.UI.UserControl
{
    TblWebInfoManager _TblWebInfoManager = new TblWebInfoManager();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            TblWebInfoEntity _TblWebInfoEntity = null;
            _TblWebInfoEntity = HNG.LIB.Securities.SecurityUtils.GetWebInfor() as TblWebInfoEntity;
            LoadInfo(_TblWebInfoEntity);
        }
    }

    private void LoadInfo(TblWebInfoEntity _TblWebInfoEntity)
    {
        if (_TblWebInfoEntity == null)
        {
            _TblWebInfoEntity = new TblWebInfoEntity();
            _TblWebInfoEntity = _TblWebInfoManager.SelectOne(8668);
            if (_TblWebInfoEntity != null)
            {
                HNG.LIB.Securities.SecurityUtils.SetWebInfor(_TblWebInfoEntity);
            }
        }

        if (_TblWebInfoEntity != null)
        {
            Page.Title = _TblWebInfoEntity.WebTitle;

            HtmlMeta meta1 = new HtmlMeta();
            meta1.Attributes.Add("name", "title");
            meta1.Attributes.Add("content", _TblWebInfoEntity.WebName);
            this.Controls.Add(meta1);

            meta1 = new HtmlMeta();
            meta1.Attributes.Add("name", "description");
            meta1.Attributes.Add("content", _TblWebInfoEntity.Description);
            this.Controls.Add(meta1);

            meta1 = new HtmlMeta();
            meta1.Attributes.Add("name", "keywords");
            meta1.Attributes.Add("content", _TblWebInfoEntity.Keywords);
            this.Controls.Add(meta1);

            meta1 = new HtmlMeta();
            meta1.Attributes.Add("name", "robots");
            meta1.Attributes.Add("content", "index, follow");
            this.Controls.Add(meta1);
        }
    }
}